<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page session="true"%>
<%
	if (session.getAttribute("user") == null) {

		RequestDispatcher rd = request
				.getRequestDispatcher("/LoginForm.jsp");
		rd.forward(request, response);
%>
<%
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<script language="JavaScript"
			src="<%=request.getContextPath()
					+ "/scripts/gen_validatorv31.js"%>"
			type="text/javascript"></script>




	</head>

	<body>


		<jsp:include page="Header.jsp"></jsp:include>
		<br />
		<center>
			<b><h4>
					Operator Update Form
				</h4>
			</b>
		</center>


		<form action="<%=request.getContextPath() + "/UpdateOperatorAction"%>"
			method="post" name="login">




			<table cellspacing=2 align="center" bgcolor="#87CEEB" width="325"
				height="60">


				<c:if test="${not empty updateoperator}">
					<c:forEach var="updateoptr" items="${updateoperator}">
						<tr>
							<td align='right'>
								<b>UserID :</b>
								<br>
							</td>
							<td>
								<input type=text name="userid" value="${updateoptr.userid }"
									readonly="readonly" />
								<br>
						<tr>
							<td align='right'>
								<b> Name :</b>
								<br>
							</td>
							<td>
								<input type=text name="firstname"
									value="${updateoptr.firstname }" />
								<br>
						<tr>
							<td align='right'>
								<b>EmailID :</b>
								<br>
							</td>
							<td>
								<input type=text name="email" value="${updateoptr.email }" />
								<br>
						<tr>
							<td align='right'>
								<b>FaxNO :</b>
								<br>
							</td>
							<td>
								<input type=text name="fax" value="${updateoptr.fax }" />
								<br>
						<tr>
							<td align='right'>
								<b>PhoneNO :</b>
								<br>
							</td>
							<td>
								<input type=text name="phone" value="${updateoptr.phone }" />
								<br>
							</td>
							<td>
								<br>
							</td>
						</tr>

					</c:forEach>
				</c:if>
				<tr>
					<td colspan='2' align='center'>
						<input type=submit value="Update" />
						<br>
					</td>
					<td>
						&nbsp;
						<br>
					</td>
				</tr>

			</table>

			<br />
			<jsp:include page="Footer.jsp"></jsp:include>

		</form>

		<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("login");

  frmvalidator.addValidation("firstname","req","State Name is required");
    frmvalidator.addValidation("firstname","alpha","State Name is Only Characters");
    
    frmvalidator.addValidation("email","req","email Name is required");
    frmvalidator.addValidation("email","email","pls Enter valid email ");
    
    frmvalidator.addValidation("fax","req","Mandal Name is required");
    frmvalidator.addValidation("fax","numeric","fax Name is Only Numbers");
    
    frmvalidator.addValidation("phone","req","phone Name is required");
    frmvalidator.addValidation("phone","numeric","Village Name is Only Numbers");
    
    </script>
	</body>
</html>
